<?php
/*
  $Id: popup_search_help.php
*/

  // Ensure a valid runtime environment or die
  if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );

  // Check if osCommerce environment is already loaded
  if (defined( '_OSCOMMERCE_LOADED' )) {
    if (!DB_SHARED) {
      // Reconnect to osCommerce Database
      tep_db_connect() or die('Unable to connect to database server!');
    }
    // Load osCommerce Globals for Boxes
    global $category_links, $languages_id, $catID, $catID_array, $current_category_id;
    global $request_type, $lng, $cart, $currencies, $language, $navigation, $breadcrumb;
  } else {
    // Load osCommerce Environment for the First Time
    require('components/'.$option.'/includes/application_top.php');
  }

  // This had to be specified because we are using a shared language library
  require(DIR_WS_LANGUAGES . $language . '/advanced_search.php');

  $navigation->remove_current_page();

  // Include the Stylesheet for osCommerce
  global $mosConfig_live_site;
?>

<link rel="stylesheet" type="text/css" href="<?php echo $mosConfig_live_site ?>/components/com_oscommerce/stylesheet.css">

<?php
  $info_box_contents = array();
  $info_box_contents[] = array('text' => HEADING_SEARCH_HELP);

  new infoBoxHeading($info_box_contents, true, true);

  $info_box_contents = array();
  $info_box_contents[] = array('text' => TEXT_SEARCH_HELP);

  new infoBox($info_box_contents);
?>

<p class="smallText" align="right"><?php echo '<a href="javascript:window.close()">' . TEXT_CLOSE_WINDOW . '</a>'; ?></p>

<?php
  require(DIR_WS_INCLUDES . 'application_bottom.php');

  // reset the Mambo Database connection (stomped by osCommerce Connection)
  if (!DB_SHARED) {
    global $database, $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix;
    $database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
  }
 ?>
